package com.jzg.common.cron4j;

import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.function.Supplier;

import com.jfinal.log.Log;
import com.jfinal.plugin.cron4j.ITask;
import com.jzg.common.util.FileUtil;

public class DELFILETask implements ITask{
	
	protected final Log log = Log.getLog(getClass());
	ExecutorService executor = Executors.newFixedThreadPool(1);

	@Override
	public void run() {
	    CompletableFuture<Integer> future = CompletableFuture.supplyAsync(new Supplier<Integer>() {
	        @Override
	        public Integer get() {
	        	FileUtil.deleteFolder("E://video");
	            return 1;
	        }
	    }, executor);
	    future.thenAccept(e -> {
	    });
	}

	@Override
	public void stop() {
		
	}

}
